﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="msg_list.aspx.cs" Inherits="HY.WEB.OA._msglist" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
  <form id="form1" runat="server">
    <div >
    
        <ext:PageManager ID="PageManager1" runat="server" />
        <ext:HiddenField ID="hidstype" runat="server"></ext:HiddenField>
<ext:Form ID="Form2" runat="server" Height="36px" BodyPadding="5px" ShowHeader="false"
ShowBorder="false" EnableBackgroundColor="true">
<Rows>
<ext:FormRow ID="FormRow1" runat="server">
<Items>

<ext:DropDownList ID="ddlfiled" runat="server" Label="查询字段"  >
</ext:DropDownList>

<ext:DropDownList ID="ddlwhere" runat="server" Label="查询条件"  >
</ext:DropDownList>

<ext:TwinTriggerBox ID="txt" runat="server" ShowLabel="false" EmptyText="关键字"
 Trigger1Icon="Clear" Trigger2Icon="Search" ShowTrigger1="false" OnTrigger2Click="ttbSearchMessage_Trigger2Click"
　OnTrigger1Click="ttbSearchMessage_Trigger1Click">
</ext:TwinTriggerBox>
    <ext:Button ID="btnSearch" Icon="Zoom" runat="server"  Text="高级查询"></ext:Button>
</Items>
</ext:FormRow>

</Rows>
</ext:Form>
   <ext:Grid ID="Grid1" Title="数据列表"     PageSize="15" ShowBorder="true" ShowHeader="true" AutoHeight="true" AllowPaging="true"
        runat="server" EnableCheckBoxSelect="True"  DataKeyNames="sid"
        OnPageIndexChange="Grid1_PageIndexChange" EnableRowNumber="True" OnSort="Grid1_Sort" AnchorValue="100% -36px">
         <Toolbars>
            <ext:Toolbar ID="Toolbar1" runat="server">
                <Items>
                
                 <ext:Button ID="btnDelete" Text="删除选中项" Icon="Delete" OnClick="btnDelete_Click" runat="server"></ext:Button>
                 <ext:Button ID="btnDelete2" Text="彻底删除选中项" Icon="DateDelete" OnClick="btnDelete2_Click" runat="server"></ext:Button>
                </Items>
            </ext:Toolbar>
        </Toolbars>
        <Columns>
            <ext:TemplateField Width="60px"  HeaderText="编号" >
                <ItemTemplate>
                    <asp:Label ID="Label1" runat="server" Text='<%# Container.DataItemIndex + 1 %>'></asp:Label>
                </ItemTemplate>
            </ext:TemplateField>

            <ext:BoundField Width="120px" DataField="dtime" DataFormatString="{0:yyyy-MM-dd}" HeaderText="发送日期" />
          
              <ext:TemplateField Width="60px"  HeaderText="发件人" >
                <ItemTemplate><%#getnm(Eval("sendnm").ToString())%>
                </ItemTemplate>
             </ext:TemplateField>


            <ext:BoundField Width="100px" DataField="outnm" DataFormatString="{0}" SortField="outnm" HeaderText="接收人" />
          
            <ext:HyperLinkField Width="100px" DataToolTipField="title" DataTextField="title"  SortField="title" HeaderText="标题" 
                DataNavigateUrlFields="sid" DataNavigateUrlFormatString="msg_view.aspx?sid={0}"
                DataNavigateUrlFieldsEncode="true"  Target="_self" ExpandUnusedSpace="True" />
       
             <ext:WindowField ColumnID="myWindowField1" Width="60px" WindowID="Window2" HeaderText="附件" Icon="EmailAttach" ToolTip="下载" DataTextFormatString="{0}" DataIFrameUrlFields="sid"
                DataIFrameUrlFormatString="download.aspx?sid={0}" DataWindowTitleField="sid" DataWindowTitleFormatString="下载 - {0}" />          
           
           <ext:WindowField ColumnID="myWindowField2" Width="60px" WindowID="Window1" HeaderText="编缉" Icon="EmailEdit" ToolTip="编缉" DataTextFormatString="{0}" DataIFrameUrlFields="sid"
                DataIFrameUrlFormatString="msg_edit.aspx?sid={0}" DataWindowTitleField="sid" DataWindowTitleFormatString="编缉 - {0}" />          
        
  
        </Columns>
    </ext:Grid>

    <ext:Window ID="Window1" Title="编辑" Popup="false" EnableIFrame="true" runat="server"
        CloseAction="HidePostBack" EnableConfirmOnClose="true" IFrameUrl="about:blank"
        OnClose="Window1_Close" Target="Top" IsModal="True" Width="750px" Height="509px">
    </ext:Window>

     <ext:Window ID="Window2" Title="编辑" Popup="false" EnableIFrame="true" runat="server"
        CloseAction="HidePostBack" EnableConfirmOnClose="true" IFrameUrl="about:blank"
        OnClose="Window1_Close" Target="Top" IsModal="True" Width="350px" Height="100px">
    </ext:Window>

    </div>
    </form>
</body>
</html>
